package com.lei.eduservice.feign;

import com.lei.eduservice.feign.impl.VodClientHystrix;
import com.lei.servicebase.exception.GuliException;
import com.lei.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Created by IntelliJ
 * Author:熊磊
 */
@FeignClient(value = "service-vod",fallback = VodClientHystrix.class)
@Component
public interface VodClient {
    //Vod的删除视频接口
    @DeleteMapping("/edu/vod/deleteVideo/{videoId}")
    Result deleteVideo(@PathVariable("videoId") String videoId);

    //删除多个阿里云视频,删除课程时使用
    @DeleteMapping("/edu/vod/deleteBatch")
    Result deleteVideoBatchIds(@RequestParam("videoIdList") List<String> videoIdList);
}
